import * as api from './util';

//获取客户公司
export function getCustom(body) {
  return api.get('/applets/provider/order/findOrderCustomList', body);
}

//历史记录
export const getRecentSearchOrder = function () {
  return api.get('/applets/provider/order/searchList');
}

//添加搜索记录
export const addSearchRecord = function (postbody) {
  return api.post('/applets/provider/order/addSearchRecords', postbody);
}

//清空历史记录
export const clearSearchRecord = function () {
  return api.post('/applets/provider/order/deleteHistory', {});
}

//获取订单列表
export const getOrderList = function (params) {
  return api.get('/app/order/list', params);
}

//订单取消
export const cancelOrder = function (postbody) {
  return api.post('/applets/provider/order/cancel', postbody);
}
//订单完成
export const finishOrder = function (id, postbody) {
  return api.put(`/app/order/updateOrderStatus/${id}`, postbody);
}

//获取订单详情
export const getOrderDetail = function (params) {
  return api.get('/applets/provider/order/get', params);
}

//订单详情关注人数-联系人列表
export const getFollowers = function (postbody) {
  return api.post('/applets/provider/order/contactManList', postbody);
}
//客户列表
export const getCustomList = function (postbody) {
  return api.post('/applets/provider/customUser/list', postbody);
}

//获取订单详情页关注人列表
export const getContactsInOrderDetail = function (params) {
  return api.get('/applets/provider/order/contactManList', params);
}
// 订单详情关注人数标记为已读
export function followIsRead(params) {
  return api.get('/applets/provider/order/attentReadSign', params);
}

//获取分享订单详情
export const getShareOrderDetail = function (params) {
  return api.get('/applets/order/get', params);
}
//微信分享，获取shareId
export function getWxShare(postbody) {
  return api.post('/share/provider/preShare', postbody);
}
//查看全部交付事件
export function getnodeEventList(params) {
  return api.get('/applets/provider/order/getnodeEventList', params);
}
//  将未读的节点事件 标记为已读
export function updateNodeStatus(params) {
  return api.post('/applets/provider/order/updateNodeStatus', params);
}
//复制短链接
export const getShortLink = function (postbody) {
  return api.post('/applets/provider/shortMessage/getShortLink', postbody);
}
//  消息页跳转进度页
export function findOrderDetail(params) {
  return api.post('/applets//provider/order/findOrderDetailByMsgId', params);
}

export function markAsReadOne(postbody) {
  return api.post('/applets/message/sign', postbody);
}

//查看无token全部交付事件
export function getEventList(params) {
  return api.get('/applets/h5/order/getEventList', params);
}